<?php
/**
 * Created by PhpStorm.
 * User: aron
 * Date: 2019/5/9
 * Time: 10:15 AM
 */

include_once "Shape.class.php";
include_once "../../Util/define/MathDefine.php";

class Circle extends Shape
{
    private $radius;

    public function __construct($radius)
    {
        $this->radius = floatval($radius);
    }

    public function perimeter()
    {
        return PI * 2 * $this->radius;
    }

    public function area()
    {
        return PI * $this->radius * $this->radius;
    }

    public function getName()
    {
        return "圆形";
    }

}